﻿using System;

namespace Kiva7.DataClasses
{
    public class ImageSize
    {
        public const string Small = "w80h80";
        public const string Normal = "w200h200";
        public const string Medium = "w325h250";
        public const string Large = "w450h360";
        public const string FullSize = "fullsize";

        public static string GetImageString(ImageSizes imageSize)
        {
            if (imageSize == ImageSizes.FullSize)
            {
                return ImageSize.FullSize;
            }
            if (imageSize == ImageSizes.Large)
            {
                return ImageSize.Large;
            }
            if (imageSize == ImageSizes.Medium)
            {
                return ImageSize.Medium;
            }
            if (imageSize == ImageSizes.Normal)
            {
                return ImageSize.Normal;
            }
            if (imageSize == ImageSizes.Small)
            {
                return ImageSize.Small;
            }
            return null;
        }

        public static Uri CreateImageUri(ImageSizes imageSize, int Id)
        {
            if (imageSize == ImageSizes.FullSize)
            {
                return CreateImageUri(Id, FullSize);
            }
            if (imageSize == ImageSizes.Large)
            {
                return CreateImageUri(Id, Large);
            }
            if (imageSize == ImageSizes.Medium)
            {
                return CreateImageUri(Id, Medium);
            }
            if (imageSize == ImageSizes.Normal)
            {
                return CreateImageUri(Id, Normal);
            }
            if (imageSize == ImageSizes.Small)
            {
                return CreateImageUri(Id, Small);
            }
            return null;
        }

        public static Uri CreateImageUri(int id, string imageSize)
        {
            return Kiva7.DataClasses.Image.CreateImageUri(id, imageSize);
        }

    }
}